<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/9/30
 * Time: 10:45
 */

namespace app\index\controller;


use think\Controller;
use think\Db;

class Demo3 extends Controller
{
    public function index(){
        $data = Db::name('admin')
            ->field('id,username,mob,last_login_ip,last_login_time,logincount')
            ->paginate(10);
        $this->assign('data', $data);
        return $this->view->fetch();
    }
}